package com.redsoil.house.model;

import com.redsoil.house.model.bean.CountAssetVO;
import com.redsoil.house.model.bean.DictListVO;
import com.redsoil.house.model.bean.MessageListVO;
import com.redsoil.house.model.bean.NewsVO;
import com.redsoil.house.model.bean.OneMessageVO;
import com.redsoil.house.model.bean.OnePropertyVO;
import com.redsoil.house.model.bean.PdfVO;
import com.redsoil.house.model.bean.ProductDetailVO;
import com.redsoil.house.model.bean.ProductsVO;
import com.redsoil.house.model.bean.PropertyLeaseVO;
import com.redsoil.house.model.bean.PropertyListVO;
import com.redsoil.house.model.bean.ReceiptListVO;
import com.redsoil.house.model.bean.ReceiptTotalVO;
import com.redsoil.house.model.bean.RoomEarnVO;
import com.redsoil.house.model.bean.RoomFileVO;
import com.redsoil.house.model.bean.UserVO;
import com.redsoil.house.model.http.HttpHelper;
import com.redsoil.house.model.http.response.HttpResponse;
import com.redsoil.house.model.prefs.PreferencesHelper;

import io.reactivex.Flowable;

/**
 * 作者：weidingqiang on 2017/7/11 09:55
 * 邮箱：dqwei@iflytek.com
 */

public class DataManager implements HttpHelper, PreferencesHelper {

    HttpHelper mHttpHelper;

    PreferencesHelper mPreferencesHelper;

    public DataManager(HttpHelper httpHelper, PreferencesHelper mPreferencesHelper) {
        mHttpHelper = httpHelper;
        this.mPreferencesHelper = mPreferencesHelper;
    }

    @Override
    public Flowable<HttpResponse<UserVO>> postLogin(String username, String password) {
        return mHttpHelper.postLogin(username, password);
    }

    @Override
    public Flowable<HttpResponse<String>> logout(String Authorization) {
        return mHttpHelper.logout(Authorization);
    }

    @Override
    public Flowable<HttpResponse<String>> findPwd(String email) {
        return mHttpHelper.findPwd(email);
    }

    @Override
    public Flowable<HttpResponse<String>> modifyPwd(String Authorization, String oldPassword, String newPassword) {
        return mHttpHelper.modifyPwd(Authorization, oldPassword, newPassword);
    }

    @Override
    public Flowable<HttpResponse<PropertyListVO>> getPropertyList(String Authorization, String typeCode) {
        return mHttpHelper.getPropertyList(Authorization,typeCode);
    }

    @Override
    public Flowable<HttpResponse<OnePropertyVO>> getOneProperty(String Authorization, String id,String moneyTypeCode,String type) {
        return mHttpHelper.getOneProperty(Authorization, id,moneyTypeCode,type);
    }

    @Override
    public Flowable<HttpResponse<PropertyLeaseVO>> getPropertyLease(String Authorization, String roomId,String moneyTypeCode) {
        return mHttpHelper.getPropertyLease(Authorization,roomId,moneyTypeCode);
    }

    @Override
    public Flowable<HttpResponse<RoomFileVO>> getRoomFile(String Authorization, String roomId) {
        return mHttpHelper.getRoomFile(Authorization,roomId);
    }

    @Override
    public Flowable<HttpResponse<NewsVO>> postNews(String Authorization,String type) {
        return mHttpHelper.postNews(Authorization,type);
    }

    @Override
    public Flowable<HttpResponse<ProductsVO>> postProducts(String Authorization, String page, String pageSize) {
        return mHttpHelper.postProducts(Authorization, page, pageSize);
    }

    @Override
    public Flowable<HttpResponse<ProductDetailVO>> postProductDetail(String Authorization, String id) {
        return mHttpHelper.postProductDetail(Authorization, id);
    }

    @Override
    public Flowable<HttpResponse<String>> postOrder(String Authorization, String productId, String price, String count, String customerMobile, String receivingAddr, String receivingName, String buyerMsg, String type, String expressFee) {
        return mHttpHelper.postOrder(Authorization, productId, price, count, customerMobile, receivingAddr, receivingName, buyerMsg, type, expressFee);
    }

    @Override
    public Flowable<HttpResponse<MessageListVO>> getMessageList(String Authorization,String keywords) {
        return mHttpHelper.getMessageList(Authorization,keywords);
    }

    @Override
    public Flowable<HttpResponse<OneMessageVO>> getOneMessage(String Authorization, String id) {
        return mHttpHelper.getOneMessage(Authorization, id);
    }

    @Override
    public Flowable<HttpResponse<String>> affirm(String Authorization, String id, String nowPrice, String isSamePrice) {
        return mHttpHelper.affirm(Authorization, id, nowPrice, isSamePrice);
    }

    @Override
    public Flowable<HttpResponse<String>> importance(String Authorization, String ids, String state) {
        return mHttpHelper.importance(Authorization, ids, state);
    }

    @Override
    public Flowable<HttpResponse<String>> lock(String Authorization, String ids, String state) {
        return mHttpHelper.lock(Authorization, ids, state);
    }

    @Override
    public Flowable<HttpResponse<String>> delete(String Authorization, String ids) {
        return mHttpHelper.delete(Authorization, ids);
    }

    @Override
    public Flowable<HttpResponse<RoomEarnVO>> getRoomEarnList(String Authorization, String roomId, String accountDate, String moneyTypeCode,String realtyId) {
        return mHttpHelper.getRoomEarnList(Authorization, roomId, accountDate, moneyTypeCode,realtyId);
    }

    @Override
    public Flowable<HttpResponse<DictListVO>> getDictList(String Authorization, String type) {
        return mHttpHelper.getDictList(Authorization,type);
    }

    @Override
    public Flowable<HttpResponse<ReceiptTotalVO>> postReceiptTotal(String Authorization, String moneyType, String paymentYear) {
        return mHttpHelper.postReceiptTotal(Authorization, moneyType, paymentYear);
    }

    @Override
    public Flowable<HttpResponse<ReceiptListVO>> postReceiptList(String Authorization, String moneyType, String paymentYear) {
        return mHttpHelper.postReceiptList(Authorization, moneyType, paymentYear);
    }

    @Override
    public Flowable<HttpResponse<CountAssetVO>> countAsset(String Authorization, String moneyTypeCode) {
        return mHttpHelper.countAsset(Authorization,moneyTypeCode);
    }

    @Override
    public Flowable<HttpResponse<String>> modifyEmail(String Authorization, String email) {
        return mHttpHelper.modifyEmail(Authorization, email);
    }

    @Override
    public Flowable<HttpResponse<PdfVO>> exportEarnings(String Authorization, String exportType, String exportVaule) {
        return mHttpHelper.exportEarnings(Authorization, exportType, exportVaule);
    }

    @Override
    public boolean getNightModeState() {
        return false;
    }

    @Override
    public void setNightModeState(boolean state) {

    }
}
